package com.xry.healthy.controller;

import com.xry.common.core.domain.R;
import com.xry.healthy.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**健康资讯
 * @Author：ypc
 * @Date：2023/10/1
 * @Description：
 */
@RestController
@RequestMapping("/message")
public class MessageController {
    @Autowired
    private MessageService messageService;

    @GetMapping("message-type")
    public R messageType(){ //所有健康资讯类型
        return messageService.messageType();
    }

    @GetMapping("message-info/{id}")
    public R messageInfo(@PathVariable Long id){ //所有健康资讯类型
        return messageService.messageInfo(id);
    }


}
